home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tcekbd.arc / BIOSKEYE.DOC < prev    next >
Text File  |  1990-10-21  |  2KB  |  55 lines

  1.  
  2. BIOSKEYE
  3.  
  4. FUNCTION:      Extended Keyboard interface, using BIOS services directly.
  5.  
  6. SYNTAX:        #include <bioskeye.h>
  7.                int bioskeye(int cmd);
  8.  
  9. PROTOTYPE IN:  bioskeye.h
  10.  
  11. REMARKS:       BIOSKEYE performs various extended keyboard operations
  12.                using BIOS interrupt 0x16. The parameter 'cmd' determines
  13.                the exact operation. This function is identical to the
  14.                Turbo-C 'BIOSKEY' function except that is returns Extended
  15.                Keyboard keyboard values.
  16.  
  17. RETURN VALUE:  The value returned by BIOSKEYE depends on the task it
  18.                performs, determined by thevalue of 'cmd':
  19.  
  20.                0 - The upper 8 bits contain the bios scan code of the
  21.                    key pressed. The lower 8 bits contain the ASCII value
  22.                    of the key pressed if applicable.
  23.  
  24.                1 - This tests whether a keystroke is available to be
  25.                    read. A return value of zero means no key is available.
  26.                    Otherwise, the value of the next keystroke is returned.
  27.                    The keystroke itself is kept to be returned by the
  28.                    next call to BIOSKEYE that has a 'cmd' value of zero.
  29.  
  30.                2 - Requests the current shift key status. The value
  31.                    returned is composed of the following bit settings
  32.                    as defined by the current shift status:
  33.  
  34.                    Bit 15 - SysReq is depressed.
  35.                    Bit 14 - Caps Lock is depressed.
  36.                    Bit 13 - Num Lock is depressed.
  37.                    Bit 12 - Scroll Lock is depressed.
  38.                    Bit 11 - Right ALT key is pressed.
  39.                    Bit 10 - Right CTRL key is pressed.
  40.                    Bit  9 - Left ALT key is pressed.
  41.                    Bit  8 - Left CTRL key is pressed.
  42.                    Bit  7 - Insert is active.
  43.                    Bit  6 - Caps Lock is active.
  44.                    Bit  5 - Num Lock is active.
  45.                    Bit  4 - Scroll Lock is active.
  46.                    Bit  3 - ALT key is pressed.
  47.                    Bit  2 - CTRL key is pressed.
  48.                    Bit  1 - Left Shift is pressed
  49.                    Bit  0 - Right Shift is pressed
  50.  
  51. PORTABILITY:   BIOSKEYE only works with IBM PCs and compatibles with
  52.                Extended or Enhanced Keyboards.
  53.  
  54. EXAMPLE:      See DEMO.C for an example on BIOSKEYE usage.
  55.